Nonvolatile memory is known in which insulating layers and conductive layers are stacked alternately in a stacked body, and memory cells are stacked in a three-dimensional structure in the height direction of the stacked body. The conductive layers inside the stacked body are, for example, word lines. Semiconductor layers that are used to form channels are provided inside the memory holes extending in the height direction of the stacked body. Charge trapping portions are provided at the intersection portions between the word lines and the channels; and a memory cell that includes the channel/charge trapping portion/word line is obtained at each of the intersection portions. The data retention characteristics of the memory cell degrade as the memory cell is downscaled. It is desirable to improve the data retention characteristics.